<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        /* string--number
        parseInt  1.开头的字符必须以数字开头 2.遇到非数字的字符就停止解析
        parseFloat

        Number -->局限性：只能识别纯数字的字符串
         */
         var str="12.3333px";
         console.log(Number(str));
         console.log(parseFloat(str))
    </script>
</body>
</html>